﻿using SD.OpcProxy.Domain.IRepositories;

namespace SD.OpcProxy.Domain.Mediators
{
    /// <summary>
    /// 仓储中介者
    /// </summary>
    public sealed class RepositoryMediator
    {
        #region # 依赖注入构造器

        /// <summary>
        /// 依赖注入构造器
        /// </summary>
        public RepositoryMediator(IOpcServerRepository opcServerRep, IVariableRepository variableRep, IVariableHistoryRepository variableHistoryRep)
        {
            this.OpcServerRep = opcServerRep;
            this.VariableRep = variableRep;
            this.VariableHistoryRep = variableHistoryRep;
        }

        #endregion

        #region # 属性

        /// <summary>
        /// OPC服务器仓储接口
        /// </summary>
        public IOpcServerRepository OpcServerRep { get; private set; }

        /// <summary>
        /// 变量仓储接口
        /// </summary>
        public IVariableRepository VariableRep { get; private set; }

        /// <summary>
        /// 变量历史仓储接口
        /// </summary>
        public IVariableHistoryRepository VariableHistoryRep { get; private set; }

        #endregion
    }
}
